# -*- coding: UTF-8 -*-
import datetime
import time


def timing(function):
    def wrapper():
        start_time = datetime.datetime.now()
        print start_time
        function()  #没有参数
        end_time = datetime.datetime.now()
        print end_time
        print "time used: {}".format(end_time - start_time)
    return wrapper


def warps():
    def deco(func):
        def _deco(*args, **kwargs):
            start = time.clock()
            func(*args, **kwargs)
            end = time.clock()
            print end - start
        return _deco
    return deco